<?php

/**
 * @Author:  Hex
 * @Date:    2017-03-10 14:41:00
 * @version  $Id$
 */
class ZhuyuanFeiyongZongjiModel extends BaseModel
{
    //获取患者支付方式
    public function getPayType($zhuyuan_id){
        return DB::select('yiliaofukuanfangshi')
            ->from('zhuyuan_basic_info')
            ->where('zhuyuan_id','=',$zhuyuan_id)
            ->where('yiyuan_id','=',$this->yiyuan_id)
            ->execute()
            ->get('yiliaofukuanfangshi', '');
    }

    public function getFeiyong($zhuyuan_id)
    {
        return DB::select('feiyong_value,feiyong_type')
            ->from('zhuyuan_feiyong_zongji')
            ->where('zhuyuan_id','=',$zhuyuan_id)
            ->where('yiyuan_id','=',$this->yiyuan_id)
            ->execute()
            ->as_array();
    }
}
